import Constants from '../constants/Constants'
import {Dispatcher} from 'flux'

const ActionTypes = Constants.ActionTypes

class DataTableActions extends Dispatcher {
  create (data) {
    this.dispatch({
      type: ActionTypes.TABLE_ROW_ADD,
      data: data
    })
  }

  remove (id) {
    this.dispatch({
      type: ActionTypes.TABLE_ROW_DELETE,
      id: id
    })
  }

  update (data) {
    this.dispatch({
      type: ActionTypes.TABLE_ROW_UPDATE,
      data: data
    })
  }
}

export default DataTableActions

